package com.ideal.frame.sys.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ideal.frame.entity.AutoModel;
import lombok.Data;
import javax.persistence.*;
import java.util.List;

@Data
@Entity
@Table(name = "t_sys_dict")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class SysDict extends AutoModel {
    private Long parentId;
    private String label;
    private String code;
    private Long sort;
    private boolean delFlag;
    @OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "parentId", referencedColumnName = "id")
    private List<SysDict> children;
}
